import request from '@/utils/request'
export const getArticleListApi = (data) => {
  return request.get('/admin/interview/query', {
    // get下使用params,后接键值对
    params: data
  })
}
/**
 * 添加面经
 * @param {} data
 * @returns
 */
export const createArticleApi = (data) => {
  return request.post('/admin/interview/create', data)
}

/**
 * 删除面经
 * @param {*} id
 * @returns
 */
export const removeArticleApi = id => {
  return request.delete('/admin/interview/remove', {
    data: {
      id
    }
  })
}

/**
 * 获取详情
 * @param {*} id
 * @returns
 */
export const getArticleDetailApi = id => {
  return request.get('/admin/interview/show', {
    params: {
      id
    }
  })
}

/**
 * 修改数据
 * @param {id,stem,content} data
 * @returns
 */
export const updateArticleApi = data => {
  return request.put('/admin/interview/update', data)
}
